package com.itbbfx.service.impl;

import com.itbbfx.entity.Upplier;
import com.itbbfx.mapper.SupplierMapper;
import com.itbbfx.service.SupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SupplierServiceImpl implements SupplierService {
    @Autowired
    private SupplierMapper supplierMapper;

    @Override
    public List<Upplier> queryAll() {
        /*Upplier u = new Upplier();
        u.setState(0);
        return supplierMapper.select(u);*/
        return supplierMapper.queryAll();
    }

    @Override
    public List<Upplier> findAllUpplier(Upplier upplier) {
        return supplierMapper.findAllUpplier(upplier);
    }

    @Override
    public int deleteUpplier(Integer supplierId) {
        return supplierMapper.deleteUpplier(supplierId);
    }

    @Override
    public int editUpplier(Upplier upplier) {
        return supplierMapper.editUpplier(upplier);
    }

    @Override
    public int addUpplier(Upplier upplier) {
        return supplierMapper.addUpplier(upplier);
    }


    @Override
    public int count(Upplier upplier) {
        return supplierMapper.count(upplier);
    }
}